package com.itcat.mysql.vo;

import lombok.Data;

import java.io.Serializable;
import java.util.List;
@Data
public class PageResult implements Serializable {
    private Integer pageNum;
    private Integer pageSize;
    private Integer total;
    private Integer totalPage;
    private List<?> list;
    public PageResult(){}
    public PageResult(Integer pageNum,Integer pageSize,int total,List list) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.list = list;
        this.total = total;
        this.totalPage = total % pageSize == 0 ? total / pageSize : total / pageSize + 1;
    }

}
